package cn.momoshenchi.medicine.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;

/**
 * 基础诊断表
 * @TableName base_diagnosis
 */
@TableName(value ="base_diagnosis")
public class BaseDiagnosis implements Serializable {
    /**
     * 诊断标识
     */
    @TableId(type = IdType.AUTO)
    private Integer diagnosisId;

    /**
     * 诊断类型，1西医，2中医
     */
    private Integer diagnosisType;

    /**
     * 诊断类型为西医时为疾病代码，为中医时为中医疾病代码
     */
    private String diseasesCode;

    /**
     * 诊断类型为西医时为疾病标识，为中医时为中医疾病标识
     */
    private Integer diseasesId;

    /**
     * 诊断类型为西医时为疾病名称，为中医时为中医疾病名称
     */
    private String diseasesName;

    /**
     * 拼音码
     */
    private String pinyinCode;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * 诊断标识
     */
    public Integer getDiagnosisId() {
        return diagnosisId;
    }

    /**
     * 诊断标识
     */
    public void setDiagnosisId(Integer diagnosisId) {
        this.diagnosisId = diagnosisId;
    }

    /**
     * 诊断类型，1西医，2中医
     */
    public Integer getDiagnosisType() {
        return diagnosisType;
    }

    /**
     * 诊断类型，1西医，2中医
     */
    public void setDiagnosisType(Integer diagnosisType) {
        this.diagnosisType = diagnosisType;
    }

    /**
     * 诊断类型为西医时为疾病代码，为中医时为中医疾病代码
     */
    public String getDiseasesCode() {
        return diseasesCode;
    }

    /**
     * 诊断类型为西医时为疾病代码，为中医时为中医疾病代码
     */
    public void setDiseasesCode(String diseasesCode) {
        this.diseasesCode = diseasesCode;
    }

    /**
     * 诊断类型为西医时为疾病标识，为中医时为中医疾病标识
     */
    public Integer getDiseasesId() {
        return diseasesId;
    }

    /**
     * 诊断类型为西医时为疾病标识，为中医时为中医疾病标识
     */
    public void setDiseasesId(Integer diseasesId) {
        this.diseasesId = diseasesId;
    }

    /**
     * 诊断类型为西医时为疾病名称，为中医时为中医疾病名称
     */
    public String getDiseasesName() {
        return diseasesName;
    }

    /**
     * 诊断类型为西医时为疾病名称，为中医时为中医疾病名称
     */
    public void setDiseasesName(String diseasesName) {
        this.diseasesName = diseasesName;
    }

    /**
     * 拼音码
     */
    public String getPinyinCode() {
        return pinyinCode;
    }

    /**
     * 拼音码
     */
    public void setPinyinCode(String pinyinCode) {
        this.pinyinCode = pinyinCode;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        BaseDiagnosis other = (BaseDiagnosis) that;
        return (this.getDiagnosisId() == null ? other.getDiagnosisId() == null : this.getDiagnosisId().equals(other.getDiagnosisId()))
            && (this.getDiagnosisType() == null ? other.getDiagnosisType() == null : this.getDiagnosisType().equals(other.getDiagnosisType()))
            && (this.getDiseasesCode() == null ? other.getDiseasesCode() == null : this.getDiseasesCode().equals(other.getDiseasesCode()))
            && (this.getDiseasesId() == null ? other.getDiseasesId() == null : this.getDiseasesId().equals(other.getDiseasesId()))
            && (this.getDiseasesName() == null ? other.getDiseasesName() == null : this.getDiseasesName().equals(other.getDiseasesName()))
            && (this.getPinyinCode() == null ? other.getPinyinCode() == null : this.getPinyinCode().equals(other.getPinyinCode()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getDiagnosisId() == null) ? 0 : getDiagnosisId().hashCode());
        result = prime * result + ((getDiagnosisType() == null) ? 0 : getDiagnosisType().hashCode());
        result = prime * result + ((getDiseasesCode() == null) ? 0 : getDiseasesCode().hashCode());
        result = prime * result + ((getDiseasesId() == null) ? 0 : getDiseasesId().hashCode());
        result = prime * result + ((getDiseasesName() == null) ? 0 : getDiseasesName().hashCode());
        result = prime * result + ((getPinyinCode() == null) ? 0 : getPinyinCode().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", diagnosisId=").append(diagnosisId);
        sb.append(", diagnosisType=").append(diagnosisType);
        sb.append(", diseasesCode=").append(diseasesCode);
        sb.append(", diseasesId=").append(diseasesId);
        sb.append(", diseasesName=").append(diseasesName);
        sb.append(", pinyinCode=").append(pinyinCode);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}